import { defHttp } from '/@/utils/http/axios';
// 登录
export function goLogin(data) {
  return defHttp.post({
    url: '/v1/company/staff/login',
    data,
  });
}
// 公司查询
export function companySearch(data) {
  return defHttp.post({
    url: '/v1/company/query',
    data,
  });
}
// 获取全部省份
export function getProvince(data) {
  return defHttp.post({
    url: '/v1/province/all/query',
    data,
  });
}
// 查询城市
export function getCity(data) {
  return defHttp.post({
    url: '/v1/city/all/query',
    data,
  });
}
// 查询区县
export function getDistrict(data) {
  return defHttp.post({
    url: '/v1/district/all/query',
    data,
  });
}
// 添加公司
export function addCompany(data) {
  return defHttp.post({
    url: '/v1/company/create',
    data,
  });
}
// 查询职工 staff
export function queryEmployees(data) {
  return defHttp.post({
    url: '/v1/company/staff/query',
    data,
  });
}
// 查询合伙人 staff
export function queryPartner(data) {
  return defHttp.post({
    url: '/v1/company/staff/partner/query',
    data,
  });
}
// 添加职工
export function addEmployee(data) {
  return defHttp.post({
    url: '/v1/company/staff/create',
    data,
  });
}
// 添加合伙人
export function addPartner(data) {
  return defHttp.post({
    url: '/v1/company/staff/partner/create',
    data,
  });
}
// 全部公司查询
export function companyAllSearch(data) {
  return defHttp.post({
    url: '/v1/company/all/query',
    data,
  });
}
// 编辑职工
export function editEmployee(data) {
  return defHttp.post({
    url: '/v1/company/staff/modify',
    data,
  });
}
// 编辑合伙人
export function editPartner(data) {
  return defHttp.post({
    url: '/v1/company/staff/partner/modify',
    data,
  });
}
// 修改账户密码
export function changeEmployeePass(data) {
  return defHttp.post({
    url: '/v1/company/staff/password/modify',
    data,
  });
}
// 删除账户
export function deleteEmployee(data) {
  return defHttp.post({
    url: '/v1/company/staff/remove',
    data,
  });
}
// 删除合伙人
export function deletePartner(data) {
  return defHttp.post({
    url: '/v1/company/staff/partner/remove',
    data,
  });
}
// 删除公司
export function deleteCompany(data) {
  return defHttp.post({
    url: '/v1/company/remove',
    data,
  });
}
// 修改公司
export function editCompany(data) {
  return defHttp.post({
    url: '/v1/company/modify',
    data,
  });
}
// 添加合同
export function addAcontract(data) {
  return defHttp.post({
    url: '/v1/company/project/contract/create',
    data,
  });
}
// 修改合同
export function editAcontract(data) {
  return defHttp.post({
    url: '/v1/company/project/contract/modify',
    data,
  });
}
// 添加申请合同
export function addApplyAcontract(data) {
  return defHttp.post({
    url: '/v1/company/project/contract/apply/create',
    data,
  });
}
export function editApplyAcontract(data) {
  return defHttp.post({
    url: '/v1/company/project/contract/apply/modify',
    data,
  });
}
// 添加出图记录
export function addDrawingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/design/create',
    data,
  });
}
export function editDrawingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/design/modify',
    data,
  });
}
// 添加申请出图记录
export function addApplyDrawingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/design/apply/create',
    data,
  });
}
export function editApplyDrawingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/design/apply/create',
    data,
  });
}
// 查询全部资质公司
export function queryAllLicense(data) {
  return defHttp.post({
    url: '/v1/license/company/all/query',
    data,
  });
}
// 添加发票记录
export function addInvoiceRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/invoice/create',
    data,
  });
}
export function editInvoiceRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/invoice/modify',
    data,
  });
}
// 添加申请发票记录
export function addApplyInvoiceRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/invoice/apply/create',
    data,
  });
}
export function editApplyInvoiceRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/invoice/apply/modify',
    data,
  });
}
// 添加招投标记录
export function addBiddingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/tender/create',
    data,
  });
}
export function editBiddingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/tender/modify',
    data,
  });
}
// 添加申请招投标记录
export function addApplyBiddingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/tender/apply/create',
    data,
  });
}
export function editApplyBiddingRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/tender/apply/create',
    data,
  });
}
// 添加验收记录
export function addcheckRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/check/create',
    data,
  });
}
export function editcheckRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/check/modify',
    data,
  });
}

// 添加申请验收记录
export function addApplycheckRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/check/apply/create',
    data,
  });
}
export function editApplycheckRecord(data) {
  return defHttp.post({
    url: '/v1/company/project/check/modify',
    data,
  });
}

export function getannouncement(data) {
  return defHttp.post({
    url: '/v1/company/notice/all/query',
    data,
  });
}

// 获取本用户的路由菜单
export function getMyRoutes(data) {
  return defHttp.post({
    // url: '/v1/menu/all/query',
    url: '/v1/company/staff/my/menu/query',
    data,
  });
}
// 获取公司所在的路由菜单
export function getCompanyRoutes(data) {
  return defHttp.post({
    url: '/v1/company/menu/query',
    data,
  });
}
// 获取所有的菜单权限
export function getAllroutes(data) {
  return defHttp.post({
    url: '/v1/menu/all/query',
    data,
  });
}
// 设置公司的菜单权限
export function setCompanyRoutes(data) {
  return defHttp.post({
    url: '/v1/company/menu/create',
    data,
  });
}
// 获取职工所拥有的路由菜单
export function getPeoRoutes(data) {
  return defHttp.post({
    url: '/v1/company/staff/menu/query',
    data,
  });
}
// 设置职工的菜单权限
export function setPeoRoutes(data) {
  return defHttp.post({
    url: '/v1/company/staff/menu/create',
    data,
  });
}
// 获取自己的的菜单权限
export function getMyselfRoutes(data) {
  return defHttp.post({
    url: '/v1/company/staff/my/menu/query',
    data,
  });
}

// 查询职位
export function getPositionQuery(data) {
  return defHttp.post({
    url: '/v1/company/staff/position/query',
    data,
  });
}
